package org.example.service.impl;

import org.example.dao.BookDao;
import org.example.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class BookServiceimpl implements BookService {
    @Autowired  //自动装配按类型
//    @Qualifier("bookDao2") 指定且依赖A
    private BookDao bookDao;



    @Override
    public void save() {
        System.out.println("Bookservice saved");
        bookDao.save();
    }
}
